80102: Function test for xfi:unit

Documentation

Tests of function xfi:unit($item as schema-element(xbrli:item)) as element(xbrli:unit)?

Owners

Name Affiliation Email Start End
Herm Fischer UBMatrix / Mark V Systems fischer@markv.com 23-01-2008 at 00:00:00

References

http://www.xbrl.org/Specification/XF-PWD-2006-12-07.htm#_Toc152670667

Test Case Variations


V-01 Returns correct unit for unit-squareMiles

Documentation

Tests that element returned is unit for specified item.

Inputs

Outputs

  • Result test: count( $result ) eq 1 and $result is //xbrli:unit[@id eq "unit-squareMiles"]

V-02 Returns correct unit for value 2002

Documentation

Tests that element returned is unit for specified item.

Inputs

Outputs

  • Result test: count( $result ) eq 1 and $result is //xbrli:unit[@id eq "unit-acres"]

V-03 Returns no unit for string valued fact concept

Documentation

Inputs

Outputs

  • Result test: empty( $result )

V-04 Returns argument error for a tuple

Documentation

Tests that no unit (empty sequence) is returned for a specified tuple.

Inputs

Outputs

  • Error code: xqt-err:XPTY0004

V-05 Wrong node to function

Documentation

XPath-defined error for node type incorrect.

Inputs

Outputs

  • Error code: xqt-err:XPTY0004

V-06 A sequence of items as argument

Documentation

XPath-defined error for node type incorrect arity of argument.

Inputs

Outputs

  • Error code: xqt-err:XPTY0004

Revisions

Name On Details
Herm Fischer 23-01-2008 at 00:00:00 Created the test case.
Herm Fischer 05-02-2008 at 00:00:00 Added variation for a tuple.